import {Component, OnInit} from '@angular/core';
import {InterfaceService} from '@services/interface.service';
import {Router} from '@angular/router';

@Component({
    selector: 'app-login',
    templateUrl: './login.page.html',
    styleUrls: ['./login.page.scss'],
})
export class LoginPage implements OnInit {

    username = '900016';
    password = '111111';

    constructor(private ifs: InterfaceService, private router: Router) {
    }

    ngOnInit() {
    }

    login() {
        this.ifs.login(this.username, this.password)
            .then(v => {
                this.router.navigateByUrl('/');
            })
            .catch(e => {

            });
    }

}
